Inline storage co-locates quantized vectors with graph nodes to reduce random I/O
Inline storage is a Qdrant optimization for on-disk collections where the quantized vector data is stored directly inside the HNSW graph node, rather than in a separate location that has to be fetched with a second read. In a normal on-disk HNSW layout, each graph node contains its edges (neighbor IDs), and the vector data lives elsewhere in the file. When the search traverses the graph, it reads a node's edges, then for each candidate it reads the corresponding vector to compute the distance. That is two random reads per node visit, and on disk the second read is the expensive one because it is a separate I/O operation to a different location. Inline storage eliminates the second read: the quantized vector is right there in the node, so a single read gets both the edges and the vector. This turns the per-node cost from two random I/Os into one, which for an I/O-bound on-disk search is roughly a 2x improvement - often more, because the second read is the one that misses the page cache most often.
The mechanism depends on quantization being in play. You cannot inline a full-precision 768-dim float32 vector into a graph node without bloating the node enormously - that would multiply the size of every node and destroy the cache and I/O benefits. But a quantized vector is small: int8 is 768 bytes, binary is 96 bytes. Inlining the quantized vector adds a bounded amount to each node, and the distance computation during traversal uses the quantized vector anyway, so the full-precision vectors can stay in a separate store that is only touched during rescoring. This is why inline storage and quantization are designed together: quantization shrinks the vector enough to fit in the node, and inline storage removes the second I/O that quantization would otherwise require. The result is that on-disk HNSW with inline quantized vectors can approach the latency of in-memory search for large collections that do not fit in RAM, at the cost of the quantization accuracy loss (which is mitigated by oversampling and rescoring).
Co-locates quantized vector data with graph edges in the same node, turning two random reads into one per graph traversal step.
Only practical for quantized vectors; inlining full-precision vectors would bloat nodes and defeat the purpose.
The full-precision vectors remain in a separate store for rescoring, so accuracy is recovered at the fine stage.
Most beneficial for large collections that do not fit in RAM and are served from disk, where random I/O dominates latency.
The trade-off is that inline storage increases the size of each graph node, which increases the memory (or disk) footprint of the graph itself. For an int8-quantized 768-dim vector, that is 768 bytes per node on top of the edges, which for a large collection is a non-trivial addition. The benefit is that the I/O reduction usually outweighs the size increase, but it is a real trade-off and depends on the ratio of vector size to edge size. For binary quantization the added size is tiny (96 bytes for 768 dims), so inline storage is almost always a win. For int8 it is still usually a win on disk, but the calculus is closer. The common mistake is assuming inline storage helps in-memory collections. It does not meaningfully - if the graph and vectors are in RAM, the second read was already cheap. Inline storage is a disk optimization, and its value is proportional to how I/O-bound the workload is. The second mistake is enabling it without quantizing, which either fails or bloats the graph depending on the version. Version note: inline storage and the associated configuration options were added in recent Qdrant releases, so verify availability on your version before designing around it.
Version-dependent: inline storage and the on-disk HNSW configuration options have evolved across recent Qdrant releases. The exact field names (on_disk on the vector params vs the HNSW config, and how inline storage is toggled) may differ on your version. Always check client.get_collection() after creation to confirm the effective configuration, and re-benchmark after upgrading, because the performance characteristics of on-disk search depend heavily on the storage layout that the current version produces.
You enable on-disk HNSW on a collection without quantization. Explain why this is usually slower than expected and what you are missing.
A teammate says inline storage is just a disk space optimization. Explain what it actually optimizes and why that matters more than disk space.
You move a 100M-vector collection from in-memory to on-disk with inline storage and quantization. p99 latency goes from 8ms to 35ms. Walk through what you would measure to decide whether to keep the on-disk setup or add RAM.
You have a choice between (a) in-memory graph with int8 quantization and (b) on-disk graph with inline binary quantization. Compare the two on memory, latency, and recall for a 50M-vector collection.
Design a storage layout for a 500M-vector collection that must fit on a single node with 256 GB of RAM and a 30ms p99. Which components go in RAM, which go on disk, and how does inline storage fit in?
Your on-disk collection has highly skewed query patterns (some regions are hot, some cold). How does inline storage interact with the OS page cache, and what would you do to exploit the skew?
Derive the break-even point where inlining quantized vectors into graph nodes is faster than storing them separately, as a function of node size, vector size, and page cache hit rate. Where does the model fail?
You are designing a storage engine for a search system that must serve 1B vectors on commodity hardware with a 20ms p99. Propose a layout that uses inline storage, and identify the two biggest risks to the design and how you would mitigate them.